<?php
    if (file_exists("../data/ProveedorDA.php")) {
        include_once("../data/ProveedorDA.php");
    }
    if (file_exists("../entity/Proveedor.php")) {
        include_once("../entity/Proveedor.php");
    }
    
    class ProveedorBR{
        public $context;
        public function ProveedorBR(){
            $this->context = new ProveedorDA();
        }
        public function obtenerID($entity){
            $registros = $this->context->ObtenerID($entity);
            return $registros;
	}
        public function numeroRegistro($codigo_alterno,$descripcion,$estado){
            return $this->context->numeroRegistro($codigo_alterno,$descripcion,$estado);
        }
        public function BuscarSearch($entity ,$start=1, $limit=100,$sidx=1,$sord=""){
            $registros = $this->context->BuscarSearch($entity,$start , $limit,$sidx,$sord);
            return $registros;
        }
        public function generarCodigo(){
            $registros = $this->context->generarCodigo();
            return $registros;
        }
        public function insertar($entity){
            $registros = $this->context->insertar($entity);
            return $registros;
        }
        public function eliminar($entity){
            $registros = $this->context->eliminar($entity);
            return $registros;
        }
        public function editar($entity){
            $registros = $this->context->editar($entity);
            return $registros;
        }
        public function validarEliminar($codigo){
            $registros = $this->context->validarEliminar($codigo);
            return $registros;
        }
    }
?>
